package org.xi.behavioral.state.states;

import org.xi.behavioral.state.MusicPlayer;
import org.xi.behavioral.state.api.PlayerState;

public class PausedState extends PlayerState {
    public PausedState(MusicPlayer player) {
        super(player);
    }

    @Override
    public void play() {
        System.out.println("Music resumed.");
        player.setState(player.PLAYING_STATE);
    }

    @Override
    public void pause() {
        System.out.println("Music is already paused.");
    }

    @Override
    public void stop() {
        System.out.println("Music stopped.");
        player.setState(player.STOPPED_STATE);
    }
}